package cn.owng.server.common.generated.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 用户活动记录
 * </p>
 *
 * @author baomidou
 * @since 2024-08-11
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("user_activity")
public class UserActivity extends Model<UserActivity> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "user_activity_id", type = IdType.ASSIGN_ID)
    private Long userActivityId;

    /**
     * 用户ID
     */
    @TableField("user_id")
    private Long userId;

    /**
     * 以JSON格式记录数据
     */
    @TableField("data")
    private String data;

    /**
     * 添加时间
     */
    @TableField("date_added")
    private Date dateAdded;

    @Override
    public Serializable pkVal() {
        return this.userActivityId;
    }
}
